home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1432.dms / var1432.adf / NDUK-V40.lha / V40 / include / intuition / cghooks.h next >
C/C++ Source or Header  |  1993-10-15  |  2KB  |  80 lines

  1. #ifndef INTUITION_CGHOOKS_H
  2. #define INTUITION_CGHOOKS_H 1
  3. /*
  4. **  $VER: cghooks.h 38.1 (11.11.91)
  5. **  Includes Release 40.15
  6. **
  7. **  Custom Gadget processing
  8. **
  9. **  (C) Copyright 1988-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef INTUITION_INTUITION_H
  18. #include <intuition/intuition.h>
  19. #endif
  20.  
  21. /*
  22.  * Package of information passed to custom and 'boopsi'
  23.  * gadget "hook" functions.  This structure is READ ONLY.
  24.  */
  25. struct GadgetInfo {
  26.  
  27.     struct Screen        *gi_Screen;
  28.     struct Window        *gi_Window;    /* null for screen gadgets */
  29.     struct Requester        *gi_Requester;    /* null if not GTYP_REQGADGET */
  30.  
  31.     /* rendering information:
  32.      * don't use these without cloning/locking.
  33.      * Official way is to call ObtainRPort()
  34.      */
  35.     struct RastPort        *gi_RastPort;
  36.     struct Layer        *gi_Layer;
  37.  
  38.     /* copy of dimensions of screen/window/g00/req(/group)
  39.      * that gadget resides in.    Left/Top of this box is
  40.      * offset from window mouse coordinates to gadget coordinates
  41.      *        screen gadgets:            0,0 (from screen coords)
  42.      *    window gadgets (no g00):    0,0
  43.      *    GTYP_GZZGADGETs (borderlayer):        0,0
  44.      *    GZZ innerlayer gadget:        borderleft, bordertop
  45.      *    Requester gadgets:        reqleft, reqtop
  46.      */
  47.     struct IBox            gi_Domain;
  48.  
  49.     /* these are the pens for the window or screen    */
  50.     struct {
  51.     UBYTE    DetailPen;
  52.     UBYTE    BlockPen;
  53.     }                gi_Pens;
  54.  
  55.     /* the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  56.      * for the screen.    Use the above for window-sensitive
  57.      * colors.
  58.      */
  59.     struct DrawInfo        *gi_DrInfo;
  60.  
  61.     /* reserved space: this structure is extensible
  62.      * anyway, but using these saves some recompilation
  63.      */
  64.     ULONG            gi_Reserved[6];
  65. };
  66.  
  67. /*** system private data structure for now ***/
  68. /* prop gadget extra info    */
  69. struct PGX    {
  70.     struct IBox    pgx_Container;
  71.     struct IBox    pgx_NewKnob;
  72. };
  73.  
  74. /* this casts MutualExclude for easy assignment of a hook
  75.  * pointer to the unused MutualExclude field of a custom gadget
  76.  */
  77. #define CUSTOM_HOOK( gadget ) ( (struct Hook *) (gadget)->MutualExclude)
  78.  
  79. #endif
  80.